<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery/jquery-1.7.1.min.js"></script>
</head>
<body>
<form id="payZone" >
	<input type="text" id="weChatParams.total_fee" name="total_fee"  value="1"/><br>
	<input type="text" id="weChatParams.body" name="body" /><br>
	<input type="text" id="weChatParams.out_trade_no" name="out_trade_no" /><br>
	<input type="text" id="weChatParams.attach" name="attach" value="1"/><br>
	<input type="text" id="weChatParams.accountId" name="accountId"  value="5c74f0abb6fa35c42b053dade8e814f1" /><br>
	<input type="text" id="weChatParams.userId" name="userId"  value="48fb5f250fadc34d37378f527dff7" /><br>
	<input type="submit" id="submitForm" value="提交"/>
</form>
                                              
<script type="text/javascript">
$("#submitForm").bind("click",function(){
	
	var formFile = new FormData();
	var total_fee = $("#weChatParams.total_fee").val();
    var body =  $("#weChatParams.body").val();
    var out_trade_no = $("#weChatParams.out_trade_no").val();
    var attach =  $("#weChatParams.attach").val();
    var accountId = $("#weChatParams.accountId").val();
    var userId =  $("#weChatParams.userId").val();
    formFile.append("total_fee", total_fee); 
    formFile.append("body", body);
    formFile.append("attach", attach); 
    formFile.append("accountId", accountId);
    formFile.append("userId", userId); 
    formFile.append("out_trade_no", out_trade_no);
    
    $.ajax({  
		url:"./finance/getPay",                
		dataType: "json",
		async: false,
		cache: false,
		processData: false,
		contentType: false,
		data:formFile,  
		type:"POST",
		success : function(result) {  
			alert(result);
		},  
		error : function(XMLHttpRequest, textStatus, errorThrown) {
			if (textStatus == 'timeout') {
				console.log(textStatus);
			}
		}
	}); 
});
</script>
</body>
</html>